
package system.base;

import java.util.ArrayList;

import framework.core.*;

/*
	Author    :Wing
	CreateTime:2008-02-20 18:11:02
*/
public class OutSubHisSearchEvent extends SearchEvent
{

	private String m_id = "" ; // all

	private String m_out_bill_id = "" ; // all

	private String m_out_bill_code = "" ; // all

	private String m_position_code = "" ; // all

	private String m_position_name = "" ; // all

	private String m_product_id = "" ; // all

	private String m_product_code = "" ; // all

	private String m_product_name = "" ; // all

	private double m_product_price = Value.NULL_DOUBLE ; // all

	private double m_product_count = Value.NULL_DOUBLE ; // all

	private double m_product_money = Value.NULL_DOUBLE ; // all

	private String m_balance_mode = "" ; // all

	private String m_get_bill_code = "" ; // all

	private String m_get_customer_code = "" ; // all

	private String m_get_customer_name = "" ; // all

	private String m_get_customer_staff_id = "" ; // all

	private String m_get_customer_staff_code = "" ; // all

	private String m_get_customer_staff_name = "" ; // all

	private String m_status = "" ; // all

	private String m_create_user_id = "" ; // all

	private String m_create_user = "" ; // all

	private String m_create_time = "" ; // all

	private String m_last_update_user_id = "" ; // all

	private String m_last_update_user = "" ; // all

	private String m_last_update_time = "" ; // all

	private String m_is_sync = "" ; // all
    
    private String m_keeper_staff_id = "" ; // all
    
    private String m_category_code = "" ;
    
    private String[] m_warehouse_tree_code;
    
    private String m_provider_name = "";
		

public OutSubHisSearchEvent() 
{
	super();
	
	setOrderField(OutSub.ID);
		
}



public String getKeeperStaffId()
{
    return m_keeper_staff_id ;
}
public void setKeeperStaffId(String v)
{
    m_keeper_staff_id = v;
}
	public String getId()
	{
		return m_id ;
	}
	public void setId(String v)
	{
		m_id = v;
	}

	public String getOutBillId()
	{
		return m_out_bill_id ;
	}
	public void setOutBillId(String v)
	{
		m_out_bill_id = v;
	}

	public String getOutBillCode()
	{
		return m_out_bill_code ;
	}
	public void setOutBillCode(String v)
	{
		m_out_bill_code = v;
	}

	public String getPositionCode()
	{
		return m_position_code ;
	}
	public void setPositionCode(String v)
	{
		m_position_code = v;
	}

	public String getPositionName()
	{
		return m_position_name ;
	}
	public void setPositionName(String v)
	{
		m_position_name = v;
	}

	public String getProductId()
	{
		return m_product_id ;
	}
	public void setProductId(String v)
	{
		m_product_id = v;
	}

	public String getProductCode()
	{
		return m_product_code ;
	}
	public void setProductCode(String v)
	{
		m_product_code = v;
	}

	public String getProductName()
	{
		return m_product_name ;
	}
	public void setProductName(String v)
	{
		m_product_name = v;
	}

	public double getProductPrice()
	{
		return m_product_price ;
	}
	public void setProductPrice(double v)
	{
		m_product_price = v;
	}

	public double getProductCount()
	{
		return m_product_count ;
	}
	public void setProductCount(double v)
	{
		m_product_count = v;
	}

	public double getProductMoney()
	{
		return m_product_money ;
	}
	public void setProductMoney(double v)
	{
		m_product_money = v;
	}

	public String getBalanceMode()
	{
		return m_balance_mode ;
	}
	public void setBalanceMode(String v)
	{
		m_balance_mode = v;
	}

	public String getGetBillCode()
	{
		return m_get_bill_code ;
	}
	public void setGetBillCode(String v)
	{
		m_get_bill_code = v;
	}

	public String getGetCustomerCode()
	{
		return m_get_customer_code ;
	}
	public void setGetCustomerCode(String v)
	{
		m_get_customer_code = v;
	}

	public String getGetCustomerName()
	{
		return m_get_customer_name ;
	}
	public void setGetCustomerName(String v)
	{
		m_get_customer_name = v;
	}

	public String getGetCustomerStaffId()
	{
		return m_get_customer_staff_id ;
	}
	public void setGetCustomerStaffId(String v)
	{
		m_get_customer_staff_id = v;
	}

	public String getGetCustomerStaffCode()
	{
		return m_get_customer_staff_code ;
	}
	public void setGetCustomerStaffCode(String v)
	{
		m_get_customer_staff_code = v;
	}

	public String getGetCustomerStaffName()
	{
		return m_get_customer_staff_name ;
	}
	public void setGetCustomerStaffName(String v)
	{
		m_get_customer_staff_name = v;
	}

	public String getStatus()
	{
		return m_status ;
	}
	public void setStatus(String v)
	{
		m_status = v;
	}

	public String getCreateUserId()
	{
		return m_create_user_id ;
	}
	public void setCreateUserId(String v)
	{
		m_create_user_id = v;
	}

	public String getCreateUser()
	{
		return m_create_user ;
	}
	public void setCreateUser(String v)
	{
		m_create_user = v;
	}

	public String getCreateTime()
	{
		return m_create_time ;
	}
	public void setCreateTime(String v)
	{
		m_create_time = v;
	}

	public String getLastUpdateUserId()
	{
		return m_last_update_user_id ;
	}
	public void setLastUpdateUserId(String v)
	{
		m_last_update_user_id = v;
	}

	public String getLastUpdateUser()
	{
		return m_last_update_user ;
	}
	public void setLastUpdateUser(String v)
	{
		m_last_update_user = v;
	}

	public String getLastUpdateTime()
	{
		return m_last_update_time ;
	}
	public void setLastUpdateTime(String v)
	{
		m_last_update_time = v;
	}

	public String getIsSync()
	{
		return m_is_sync ;
	}
	public void setIsSync(String v)
	{
		m_is_sync = v;
	}
		
    public String getCategoryCode()
    {
        return m_category_code ;
    }
    public void setCategoryCode(String v)
    {
        m_category_code = v;
    }


	public String viewId() throws Exception
	{
		return Value.view(getId());
	}

	public String viewOutBillId() throws Exception
	{
		return Value.view(getOutBillId());
	}

	public String viewOutBillCode() throws Exception
	{
		return Value.view(getOutBillCode());
	}

	public String viewPositionCode() throws Exception
	{
		return Value.view(getPositionCode());
	}

	public String viewPositionName() throws Exception
	{
		return Value.view(getPositionName());
	}

	public String viewProductId() throws Exception
	{
		return Value.view(getProductId());
	}

	public String viewProductCode() throws Exception
	{
		return Value.view(getProductCode());
	}

	public String viewProductName() throws Exception
	{
		return Value.view(getProductName());
	}

	public String viewProductPrice() throws Exception
	{
		return Value.view(getProductPrice());
	}

	public String viewProductCount() throws Exception
	{
		return Value.view(getProductCount());
	}

	public String viewProductMoney() throws Exception
	{
		return Value.view(getProductMoney());
	}

	public String viewBalanceMode() throws Exception
	{
		return Value.view(getBalanceMode());
	}

	public String viewGetBillCode() throws Exception
	{
		return Value.view(getGetBillCode());
	}

	public String viewGetCustomerCode() throws Exception
	{
		return Value.view(getGetCustomerCode());
	}

	public String viewGetCustomerName() throws Exception
	{
		return Value.view(getGetCustomerName());
	}

	public String viewGetCustomerStaffId() throws Exception
	{
		return Value.view(getGetCustomerStaffId());
	}

	public String viewGetCustomerStaffCode() throws Exception
	{
		return Value.view(getGetCustomerStaffCode());
	}

	public String viewGetCustomerStaffName() throws Exception
	{
		return Value.view(getGetCustomerStaffName());
	}

	public String viewStatus() throws Exception
	{
		return Value.view(getStatus());
	}

	public String viewCreateUserId() throws Exception
	{
		return Value.view(getCreateUserId());
	}

	public String viewCreateUser() throws Exception
	{
		return Value.view(getCreateUser());
	}

	public String viewCreateTime() throws Exception
	{
		return Value.view(getCreateTime());
	}

	public String viewLastUpdateUserId() throws Exception
	{
		return Value.view(getLastUpdateUserId());
	}

	public String viewLastUpdateUser() throws Exception
	{
		return Value.view(getLastUpdateUser());
	}

	public String viewLastUpdateTime() throws Exception
	{
		return Value.view(getLastUpdateTime());
	}

	public String viewIsSync() throws Exception
	{
		return Value.view(getIsSync());
	}


	public Conditions toConditions() throws Exception
	{
		Conditions c = super.toConditions();

	c.add(getCondition(OutSub.ID,getId()));

	c.add(getCondition(OutSub.OUT_BILL_ID,getOutBillId()));

	c.add(getCondition(OutSub.POSITION_CODE,getPositionCode()));

	c.add(getCondition(OutSub.POSITION_NAME,getPositionName()));

	c.add(getCondition(OutSub.PRODUCT_ID,getProductId()));

	c.add(getCondition(OutSub.PRODUCT_CODE,getProductCode()));

	c.add(getCondition(OutSub.PRODUCT_NAME,getProductName()));

	c.add(getCondition(OutSub.PRODUCT_PRICE,getProductPrice()));

	c.add(getCondition(OutSub.PRODUCT_COUNT,getProductCount()));

	c.add(getCondition(OutSub.PRODUCT_MONEY,getProductMoney()));

	c.add(getCondition(OutSub.BALANCE_MODE,getBalanceMode()));

	c.add(getCondition(OutSub.GET_BILL_CODE,getGetBillCode()));

	c.add(getCondition(OutSub.GET_CUSTOMER_CODE,getGetCustomerCode()));

	c.add(getCondition(OutSub.GET_CUSTOMER_NAME,getGetCustomerName()));

	c.add(getCondition(OutSub.GET_CUSTOMER_STAFF_ID,getGetCustomerStaffId()));

	c.add(getCondition(OutSub.GET_CUSTOMER_STAFF_CODE,getGetCustomerStaffCode()));

	c.add(getCondition(OutSub.GET_CUSTOMER_STAFF_NAME,getGetCustomerStaffName()));

	c.add(getCondition(OutSub.STATUS,getStatus()));

	c.add(getCondition(OutSub.CREATE_USER_ID,getCreateUserId()));

	c.add(getCondition(OutSub.CREATE_USER,getCreateUser()));

	c.add(getCondition(OutSub.CREATE_TIME,getCreateTime()));

	c.add(getCondition(OutSub.LAST_UPDATE_USER_ID,getLastUpdateUserId()));

	c.add(getCondition(OutSub.LAST_UPDATE_USER,getLastUpdateUser()));

	c.add(getCondition(OutSub.LAST_UPDATE_TIME,getLastUpdateTime()));

	c.add(getCondition(OutSub.IS_SYNC,getIsSync()));
	
	c.add(getCondition(OutSub.CUSTOMER_BUS_CODE, getCustomerBusCode()));
	
    if (!getOutBillCode().equalsIgnoreCase(""))
    {
        c.add(OutSub.OUT_BILL_CODE, Conditions.EQUAL,getOutBillCode());
    }
		
//add by Sindy start
	String searchSQL = "select id from t_out_head_his where 1=1";
	boolean searchSQLFlag = false; //标示searchSQL查询是否需要执行
	String searchSQL1 = "select out_bill_id id from t_out_sub_his a,t_product b where a.product_code = b.CONCENTRICITY_CODE ";
	boolean searchSQLFlag1 = false; //标示searchSQL1查询是否需要执行
	
	   if (getWarehouseCodes() != null) {
	       String warehouse = "";
	       
	       for(int i=0;i<getWarehouseCodes().length;i++){
	           if(i == getWarehouseCodes().length - 1){
	               warehouse = warehouse + "warehouse_code = '"+ getWarehouseCodes()[i] +"'";
	           }else{
	               warehouse = warehouse + "warehouse_code = '"+ getWarehouseCodes()[i] +"' or ";
	           }
	       }
	       //c.add(OutSub.OUT_BILL_ID + " in (select id from t_out_head where "+ warehouse +")") ;
	       searchSQL +=  " and ("+ warehouse + ")";
	       searchSQLFlag = true;
	    }
	   
	   String[] searchSQLKeyWord = new String[50];
	   for(int i = 0; i < 50; i++){
	       searchSQLKeyWord[i] = "";
	   }
	   int keyCount = 0;
	   
	   String[] keyWord = new String[50];
	   for(int i = 0; i < 50; i++){
           keyWord[i] = "";
       }
	   int keyCount1 = 0;
	   
	    if (!getKeyWord().equalsIgnoreCase(""))
	    {
	        
	        keyWord[0] = "%" + getKeyWord() + "%";
	        keyWord[1] = "%" + getKeyWord() + "%";
	        keyWord[2] = "%" + getKeyWord() + "%";
	        keyWord[3] = "%" + getKeyWord() + "%";
	        keyWord[4] = "%" + getKeyWord() + "%";
	        keyWord[5] = "%" + getKeyWord() + "%";
	        keyWord[6] = "%" + getKeyWord() + "%";
	        
	        keyCount1 = 7;
	        
	        //c.add(OutSub.OUT_BILL_ID + " in (select out_bill_id from t_out_sub a,t_product b where a.product_code = b.CONCENTRICITY_CODE and (b.NAME like ? or b.CONCENTRICITY_CODE like ? or b.MODEL like ? " +
	        //      "or b.SPEC like ? or b.PRODUCT_BRAND like ? or b.MANUFATURER like ? or b.APPENDER_PROPERTY like ? ))",Conditions.CUSTOM,keyWord); 
	        searchSQL1 += " and (b.NAME like ? or b.CONCENTRICITY_CODE like ? or b.MODEL like ? " +
	                     "or b.SPEC like ? or b.PRODUCT_BRAND like ? or b.MANUFATURER like ? or b.APPENDER_PROPERTY like ? )";
	        searchSQLFlag1 = true;
	    }
	    
        if (!getIsNormal().equalsIgnoreCase(""))
        {
            c.add(OutSub.OUT_BILL_ID + " in (select out_bill_id from t_out_sub_his a,t_product b where a.product_code = b.CONCENTRICITY_CODE and b.is_normal = ?)",Conditions.CUSTOM,getIsNormal());
            searchSQL1 += " and b.is_normal = ?";
            keyWord[keyCount1] = getIsNormal();
            keyCount1++;
            searchSQLFlag1 = true;
        }

 
       if (!getRepairBillCode().equalsIgnoreCase(""))
       {
           //c.add(OutSub.OUT_BILL_ID + " in (select id from t_out_head where repair_bill_code = ?)",Conditions.CUSTOM,getRepairBillCode());
           searchSQL += " and repair_bill_code = ?";
           searchSQLKeyWord[keyCount] = getRepairBillCode();
           keyCount++;
           searchSQLFlag = true;
       }
       
       if (!getOutType().equalsIgnoreCase(""))
       {
           //c.add(OutSub.OUT_BILL_ID + " in (select id from t_out_head where out_type = ?)",Conditions.CUSTOM,getOutType());
           searchSQL += " and out_type = ?";
           searchSQLKeyWord[keyCount] = getOutType();
           keyCount++;
           searchSQLFlag = true;
       }    
       if (!getBalanceFlag().equalsIgnoreCase(""))
       {
           //c.add(OutSub.OUT_BILL_ID + " in (select id from t_out_head where balance_flag = ?)",Conditions.CUSTOM,getBalanceFlag());
           searchSQL += " and balance_flag = ?";
           searchSQLKeyWord[keyCount] = getBalanceFlag();
           keyCount++;
           searchSQLFlag = true;
       }  
       if (!getCustomerName().equalsIgnoreCase(""))
       {
           //c.add(OutSub.OUT_BILL_ID + " in (select id from t_out_head where customer_name = ?)",Conditions.CUSTOM,getCustomerName());
           searchSQL += " and customer_name = ?";
           searchSQLKeyWord[keyCount] = getCustomerName();
           keyCount++;
           searchSQLFlag = true;
       }  
        
	    if (!getStartOutTime().equalsIgnoreCase("")) {
	        //c.add(OutSub.OUT_BILL_ID + " in (select id from t_out_head where out_time >= ? )",Conditions.CUSTOM,getStartOutTime()+" 00:00:00");
	        searchSQL += " and out_time >= ?";
	        if(getStartOutTime().length()<10)
	            searchSQLKeyWord[keyCount] = getStartOutTime()+" 00:00:00";
	        else
	            searchSQLKeyWord[keyCount] = getStartOutTime();
	        keyCount++;
	        searchSQLFlag = true;
	    }
	    
	    if (!getEndOutTime().equalsIgnoreCase("")) {
	        //c.add(OutSub.OUT_BILL_ID + " in (select id from t_out_head where out_time <= ? )",Conditions.CUSTOM,getEndOutTime()+" 23:59:60");
	        searchSQL += " and out_time <= ?";
	        if(getEndOutTime().length()<10)
	            searchSQLKeyWord[keyCount] = getEndOutTime()+" 23:59:60";
	        else
	            searchSQLKeyWord[keyCount] = getEndOutTime();
            keyCount++;
            searchSQLFlag = true;
	    }
	            
	    //c.add(OutSub.OUT_BILL_ID + " in (select id from t_out_head where warehouse_code like ? )",Conditions.CUSTOM,getWarehouseCodeUser()+"%");
	    searchSQL += " and warehouse_code like ?";
	    searchSQLKeyWord[keyCount] = getWarehouseCodeUser() + "%";
	    keyCount++;
        searchSQLFlag = true;
        
        
        String totalSql = ""; //合并searchSQL和searchSQL1查询语句
        if(searchSQLFlag == true){
            totalSql += searchSQL;
            if(searchSQLFlag1 == true){
                totalSql += " union ";
            }
        }
        if(searchSQLFlag1 == true){
            totalSql += searchSQL1;
        }
        
        
        if(!"".equals(totalSql)){
            //如果有查询，则生成查询条件值字符数组。
            int total = 0;
            for(int i = 0; i < searchSQLKeyWord.length; i++){
                if(!"".equals(searchSQLKeyWord[i])){
                    total++;
                }
            }
            for(int i = 0; i < keyWord.length; i++){
                if(!"".equals(keyWord[i])){
                    total++;
                }
            }
            
            String[] kw = new String[total];
            if(total > 0){
                int j = 0;
                for(int i = 0; i < searchSQLKeyWord.length; i++){
                    if(!"".equals(searchSQLKeyWord[i])){
                        kw[j] = searchSQLKeyWord[i];
                        j++;
                    }
                }
                for(int i = 0; i < keyWord.length; i++){
                    if(!"".equals(keyWord[i])){
                        kw[j] = keyWord[i];
                        j++;
                    }
                }
                
                c.add(OutSub.OUT_BILL_ID + " in (" + totalSql + ")", Conditions.CUSTOM, kw);
            }
            else{
                c.add(OutSub.OUT_BILL_ID + " in (" + totalSql + ")");
            }
        }
        
	    
	    //c.add(ProductStorage.WAREHOUSE_CODE,Conditions.LIKE,getWarehouseCodeUser()+"%");
//add by Sindy end
	    //add by benny start
	    if (!getKeeperStaffId().equalsIgnoreCase("")) {
	        c.add(OutSub.PRODUCT_ID + " in (select product_id from T_WAREHOUSE_PRODUCT where keeper_staff_id = ? )",Conditions.CUSTOM,getKeeperStaffId());
	    }
	    //add by benny end
	  //分类编码查询
	    String categorycode3 = getGrandfatherCategoryCode();
	    String categorycode2 = getUpperCategoryCode();
	    String categorycode1 = getCategoryCode();
	    if (categorycode3== null || categorycode3.equalsIgnoreCase("null") || categorycode3.equalsIgnoreCase("")) 
	    {
	        categorycode3 = "";
	        setGrandfatherCategoryCode(categorycode3);
	    }    
	    if (categorycode2== null || categorycode2.equalsIgnoreCase("null") || categorycode2.equalsIgnoreCase(""))
	    {
	        categorycode2 = "";
	        setUpperCategoryCode(categorycode2);
	    }
	    if (categorycode1== null || categorycode1.equalsIgnoreCase("null") || categorycode1.equalsIgnoreCase("")) 
	    {
	        categorycode1 = "";
	        setCategoryCode(categorycode1);
	    }
	    if (!categorycode1.equals(""))
	    {
            c.add(OutSub.PRODUCT_CODE + " in (select distinct a.concentricity_code from t_product a where a.category_code=? )",Conditions.CUSTOM,new String[]{categorycode1});
	    }
	    else if (!categorycode2.equals(""))
	    {
	        c.add(OutSub.PRODUCT_CODE + " in (select distinct a.concentricity_code from t_product a  join t_product_category b  on a.category_code = b.code where b.CATEGORY_ID2= ? or b.code=?  )",Conditions.CUSTOM,new String[]{categorycode2,categorycode2});
	    }
	    else if (!categorycode3.equals(""))
	    {
	   
	        c.add(OutSub.PRODUCT_CODE + " in (select distinct a.concentricity_code from t_product a  join t_product_category b  on a.category_code = b.code where b.CATEGORY_ID1= ? or b.code=?  )",Conditions.CUSTOM,new String[]{categorycode3,categorycode3}); 
	    } 
        if(!getProviderName().equalsIgnoreCase("")){
        	c.add(OutSub.PROVIDER_CODE + " in (select code from t_provider where name like '%"+getProviderName()+"%')");
        }
	    
		return c ;
	}
	
	 private String m_grandfather_category_code = "";    
	    public String getGrandfatherCategoryCode()
	    {
	        return m_grandfather_category_code ;
	    }
	    public void setGrandfatherCategoryCode(String v)
	    {
	        m_grandfather_category_code = v;
	    }     
	    public String viewGrandfatherCategoryCode() throws Exception
	    {
	        return Value.view(getGrandfatherCategoryCode());
	    }   
	    private String m_upper_category_code = "";    
	    public String getUpperCategoryCode()
	    {
	        return m_upper_category_code ;
	    }
	    public void setUpperCategoryCode(String v)
	    {
	        m_upper_category_code = v;
	    }           
	    public String viewUpperCategoryCode() throws Exception
	    {
	        return Value.view(getUpperCategoryCode());
	    }    
	    
//add by Wing start

//add by Wing end
	
	
//add by Sindy start
    private String []m_warehouse_codes;
    public String []getWarehouseCodes()
    {
        return m_warehouse_codes ;
    }
    public void setWarehouseCodes(String []warehouseCodes)
    {
        this.m_warehouse_codes = warehouseCodes;
    }
    private String m_key_word = "";
    public String getKeyWord()
    {
        return m_key_word;
    }
    public void setKeyWord(String keyWord)
    {
        this.m_key_word = keyWord;
    }
    public String viewKeyWord() throws Exception
    {
        return Value.view(getKeyWord());
    }
    
    private String m_is_normal = "";
    public String getIsNormal() {
        return this.m_is_normal;
    }
    public void setIsNormal(String isNormal) {
        this.m_is_normal = isNormal;
    }
    
    private String m_start_outTime = "";
    public String getStartOutTime() {
        return this.m_start_outTime;
    }
    public void setStartOutTime(String startOutTime) {
        this.m_start_outTime = startOutTime;
    }
    
    private String m_end_outTime = "";
    public String getEndOutTime() {
        return this.m_end_outTime;
    }
    public void setEndOutTime(String endOutTime) {
        this.m_end_outTime = endOutTime;
    }
 
    private String m_warehouse_code_user = "" ; // all
    public String getWarehouseCodeUser()
    {
        return m_warehouse_code_user ;
    }
    public void setWarehouseCodeUser(String v)
    {
        m_warehouse_code_user = v;
    }
    public String viewWarehouseCodeUser() throws Exception
    {
        return Value.view(getWarehouseCodeUser());
    }	

    private String m_repair_bill_code = "";
    public String getRepairBillCode()
    {
        return m_repair_bill_code ;
    }
    public void setRepairBillCode(String v)
    {
        m_repair_bill_code = v;
    }
    public String viewRepairBillCode() throws Exception
    {
        return Value.view(getRepairBillCode());
    }
    
    private String m_customer_bus_code = "";
    public String getCustomerBusCode()
    {
        return m_customer_bus_code ;
    }
    public void setCustomerBusCode(String v)
    {
        m_customer_bus_code = v;
    }    
    public String viewCustomerBusCode() throws Exception
    {
        return Value.view(getCustomerBusCode());
    }  
    
    private String m_out_type = "";
    public String getOutType()
    {
        return m_out_type ;
    }
    public void setOutType(String v)
    {
        m_out_type = v;
    }
    public String viewOutType() throws Exception
    {
        return Value.view(getOutType());
    }
    
    private String m_balance_flag = "";
    public String getBalanceFlag()
    {
        return m_balance_flag ;
    }
    public void setBalanceFlag(String v)
    {
        m_balance_flag = v;
    }    
    public String viewBalanceFlag() throws Exception
    {
        return Value.view(getBalanceFlag());
    }
    private String m_customer_code = "";
    public String getCustomerCode()
    {
        return m_customer_code ;
    }
    public void setCustomerCode(String v)
    {
        m_customer_code = v;
    }
    private String m_customer_name = "";
    public String getCustomerName()
    {
        return m_customer_name ;
    }
    public void setCustomerName(String v)
    {
        m_customer_name = v;
    }
    public String viewCustomerCode() throws Exception
    {
        return Value.view(getCustomerCode());
    }

    public String viewCustomerName() throws Exception
    {
        return Value.view(getCustomerName());
    }
    
    private String m_warehouse_code = "";
    public String getWarehouseCode()
    {
        return m_warehouse_code ;
    }
    public void setWarehouseCode(String v)
    {
        m_warehouse_code = v;
    }
    private String m_warehouse_name = "";
    public String getWarehouseName()
    {
        return m_warehouse_name ;
    }
    public void setWarehouseName(String v)
    {
        m_warehouse_name = v;
    }
//add by Sindy end 

	public String[] getWarehouseTreeCode() {
		return m_warehouse_tree_code;
	}

	public void setWarehouseTreeCode(String[] WarehouseTreeCode) {
		m_warehouse_tree_code = WarehouseTreeCode;
	}
	public String getProviderName() {
		return m_provider_name;
	}

	public void setProviderName(String mProviderName) {
		m_provider_name = mProviderName;
	}
	
	public String viewProviderName() throws Exception
	{
		return Value.view(getProviderName());
	}
}
